import request from "@/config/index.js"
// 登陆
export function userLogin(data) {
  return request("/user/login",data,"POST",true)
}
// 获取用户信息
export function getUserInfoApi(data) {
  return request(`/user/query/self`,data,"get",false)
}
export function updateUserInfoApi(data) {
  return request(`/user/update/self`,data,"post",false)
}
// 获取收货地址
export function getAddressApi(data) {
  return request(`/address/list`,data,"get",false)
}
// 添加收货地址
export function addAddressApi(data) {
  return request(`/address/update`,data,"post",false)
}
// 查询自己的默认收件地址
export function addressDefaultApi(data) {
  return request(`/address/default/query`,data,"get",false)
}
// 设为默认收货地址
export function setAddressDefaultApi(id) {
  return request(`/address/setDefault/${id}`,null,"get",true)
}
// 获取资金记录
export function moneyLogApi() {
  return request(`/user/query/moneyRecord/mine`,null,"get",false)
}

export function getLikeApi(data) {
  return request(`/like/orNot/${data}`,null,"post",false)
}
//收藏/取消收藏
export function likeApi(data) {
  return request(`/like/switch/${data}`,null,"post",false)
}
export function fxteamcount(data) {
  return request(`/user/query/fx/team/count`,data,"get",false)
}
export function fxteammoney(data) {
  return request(`/user/query/fx/team/money`,data,"get",false)
}
export function fxteammoneylist(data) {
  return request(`/user/query/fx/team/money/list`,data,"get",false)
}
export function fxteamuesrs(data) {
  return request(`/user/query/fx/team/uesrs`,data,"get",false)
}
export function moneyRecord(data) {
  return request(`/user/query/moneyRecord/mine`,data,"get",false)
}

export function getcollect(data) {
  return request(`/user/query/moneyRecord/mine`,data,"get",false)
}
export function removecollet(data) {
  return request(`/user/query/moneyRecord/mine`,data,"get",false)
}

export function withdraw(data) {
  return request(`/user/query/moneyRecord/mine`,data,"get",false)
}